<template>
<LayoutView :select-index="4">
  <el-tabs tab-position="left" style="height: 100%;margin-top: 15px">
    <el-tab-pane lazy label="用户信息"><UserInfo/></el-tab-pane>
    <el-tab-pane lazy label="我的收藏"><LikeView/></el-tab-pane>
    <el-tab-pane lazy label="我的评论"><CommentList :user-id="loginId"></CommentList></el-tab-pane>
    <el-tab-pane lazy label="意见反馈"><FeedbackView/></el-tab-pane>
    <el-tab-pane lazy label="修改密码">4</el-tab-pane>
  </el-tabs>
</LayoutView>
</template>

<script>
import LayoutView from '@/views/front/components/LayoutView.vue'
import UserInfo from '@/views/front/components/UserInfo.vue'
import LikeView from '@/views/front/components/LikeView.vue'
import CommentList from '@/views/front/components/CommentList.vue'
import FeedbackView from '@/views/front/components/FeedbackView.vue'
export default {
  name: 'UserCenter',
  components: { LayoutView, UserInfo, LikeView, CommentList, FeedbackView },
  data () {
    return {
      loginId: ''
    }
  },
  created () {
    this.loginId = JSON.parse(sessionStorage.getItem('vipInfo'))?.loginInfo?.userId
    if (!this.loginId) {
      this.$message.error('请先登录！')
      this.$router.replace('/')
    }
  }
}
</script>

<style scoped>

</style>
